package com.zzzyh.forumsystemclient.dao;

import com.zzzyh.forumsystemclient.model.Conversation;
import com.zzzyh.forumsystemclient.model.Message;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

@Mapper
public interface MessageMapper {
    int insert(Message row);

    int insertSelective(Message row);

    Message selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(Message row);

    int updateByPrimaryKey(Message row);

    List<Message> selectByUser(@Param("user1") Long sendUser,  @Param("user2") Long receiveUser);

    List<Long> getSendUsers(Long userId);
}